﻿using DynamicViewFormApp.SubForm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DynamicViewFormApp.Component
{
    /// <summary>
    /// 窗口基础服务类
    /// </summary>
    class FormBaseService
    {
        /// <summary>
        /// 打开新建答题卡窗口
        /// </summary>
        /// <param name="mainForm"></param>
        /// <param name="text"></param>
        internal static void OpenCreateForm(MainForm mainForm, string text)
        {
            Form newForm = new NewForm
            {
                Text = text,
                StartPosition = FormStartPosition.CenterScreen
            };
            newForm.ShowDialog(mainForm);
        }
        internal static void OpenStartForm(MainForm mainForm)
        {
            Form startForm = new StartForm();
            startForm.ShowDialog(mainForm);
        }
    }
}
